package com.dhp.bkOjjudgeservice.controller;

import com.alibaba.csp.sentinel.annotation.SentinelResource;
import com.dhp.bkOjfeignclient.service.JudgeFeignClient;
import com.dhp.bkOjjudgeservice.JudgeService;
import com.dhp.common.BaseResponse;
import com.dhp.model.entity.QuestionSubmit;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;

/**
 * feignController
 */
@RestController
@RequestMapping("/inner")
public class JudgeFeignController implements JudgeFeignClient {
    @Autowired
    private JudgeService judgeService;

    @Override
    @SentinelResource("doJudge")
    @PostMapping("/do")
    public QuestionSubmit doJudge(@RequestBody QuestionSubmit questionSubmit) {
        return judgeService.doJudge(questionSubmit);
    }
}
